<?php
class Admin_model extends CI_Model {
	public $table_name = "admin";
    public function get_one($username,$password){
    	$array = array('username' => $username, 'password' => $password);
        $query = $this->db->where($array)->get($this->table_name);
    	// $query = $this->db->query("select * from admin where username ='$username' and password = '$password'");//同上
        return $query->row();
    }
}